<?php
// +-------------------------------------------------------------------------------
// | DingZone [ A Rapid Development Framework For Dingtalk ]
// +-------------------------------------------------------------------------------
// | 钉钉外部联系人新建及修改请求类 v1.0
// |
// | Copyright (c) 2014-2018 http://www.heimalanshi.com All rights reserved.
// | Author : Jie
// | Date : 2018-08-09
// +-------------------------------------------------------------------------------

namespace ding\request;


class CorpExtcontactSaveRequest extends DingApiRequest {
    /**
     * 用户id
     *
     * @var string
     */
    private $user_id;
    /**
     * 企业名称
     *
     * @var string
     */
    private $name;
    /**
     * 手机号国家区号
     *
     * @var string
     */
    private $state_code;
    /**
     * 手机号
     *
     * @var string
     */
    private $mobile;
    /**
     * 负责人userId
     *
     * @var string
     */
    private $follower_user_id;
    /**
     * 标签列表
     *
     * @var array
     */
    private $label_ids;

    /**
     * 职位
     * @var string
     */
    private $title;
    /**
     * 地址
     * @var string
     */
    private $address;
    /**
     * 备注
     * @var string
     */
    private $remark;
    /**
     * 企业名称
     * @var string
     */
    private $company_name;
    /**
     * 共享给的部门id列表
     * @var array
     */
    private $share_dept_ids;
    /**
     * 共享给你的userid列表
     * @var array
     */
    private $share_user_ids;

    /**
     * 创建外部联系人请求
     *
     * @param string $name
     * @param string $followerUserId
     * @param array $labelIds
     * @param string $mobile
     * @param string $stateCode
     * @return static
     */
    public static function extcontactCreateRequest($name, $followerUserId, array $labelIds, $mobile, $stateCode = "86") {
        $req = new static();
        $req->name = $name;
        $req->state_code = $stateCode;
        $req->mobile = $mobile;
        $req->follower_user_id = $followerUserId;
        $req->label_ids = $labelIds;
        return $req;
    }

    /**
     * 外部联系人更新请求
     *
     * @param $userId
     * @param $name
     * @param $followerUserId
     * @param array $labelIds
     * @return static
     */
    public static function extcontactUpdateRequest($userId, $name, $followerUserId, array $labelIds) {
        $req = new static();
        $req->name = $name;
        $req->user_id = $userId;
        $req->follower_user_id = $followerUserId;
        $req->label_ids = $labelIds;
        return $req;
    }

    /**
     * @return string
     */
    public function getName() {
        return $this->name;
    }

    /**
     * @param string $name
     * @return CorpExtcontactSaveRequest
     */
    public function setName($name) {
        $this->name = $name;
        return $this;
    }

    /**
     * @return string
     */
    public function getStateCode() {
        return $this->state_code;
    }

    /**
     * @param string $stateCode
     * @return CorpExtcontactSaveRequest
     */
    public function setStateCode($stateCode) {
        $this->state_code = $stateCode;
        return $this;
    }

    /**
     * @return string
     */
    public function getMobile() {
        return $this->mobile;
    }

    /**
     * @param string $mobile
     * @return CorpExtcontactSaveRequest
     */
    public function setMobile($mobile) {
        $this->mobile = $mobile;
        return $this;
    }

    /**
     * @return string
     */
    public function getFollowerUserId() {
        return $this->follower_user_id;
    }

    /**
     * @param string $followerUserId
     * @return CorpExtcontactSaveRequest
     */
    public function setFollowerUserId($followerUserId) {
        $this->follower_user_id = $followerUserId;
        return $this;
    }

    /**
     * @return array
     */
    public function getLabelIds() {
        return $this->label_ids;
    }

    /**
     * @param array $labelIds
     * @return CorpExtcontactSaveRequest
     */
    public function setLabelIds($labelIds) {
        $this->label_ids = $labelIds;
        return $this;
    }

    /**
     * @return string
     */
    public function getTitle() {
        return $this->title;
    }

    /**
     * @param string $title
     * @return CorpExtcontactSaveRequest
     */
    public function setTitle($title) {
        $this->title = $title;
        return $this;
    }

    /**
     * @return string
     */
    public function getAddress() {
        return $this->address;
    }

    /**
     * @param string $address
     * @return CorpExtcontactSaveRequest
     */
    public function setAddress($address) {
        $this->address = $address;
        return $this;
    }

    /**
     * @return string
     */
    public function getRemark() {
        return $this->remark;
    }

    /**
     * @param string $remark
     * @return CorpExtcontactSaveRequest
     */
    public function setRemark($remark) {
        $this->remark = $remark;
        return $this;
    }

    /**
     * @return string
     */
    public function getCompanyName() {
        return $this->company_name;
    }

    /**
     * @param string $companyName
     * @return CorpExtcontactSaveRequest
     */
    public function setCompanyName($companyName) {
        $this->company_name = $companyName;
        return $this;
    }

    /**
     * @return array
     */
    public function getShareDeptIds() {
        return $this->share_dept_ids;
    }

    /**
     * @param array $shareDeptIds
     * @return CorpExtcontactSaveRequest
     */
    public function setShareDeptIds($shareDeptIds) {
        $this->share_dept_ids = $shareDeptIds;
        return $this;
    }

    /**
     * @return array
     */
    public function getShareUserIds() {
        return $this->share_user_ids;
    }

    /**
     * @param array $shareUserIds
     * @return CorpExtcontactSaveRequest
     */
    public function setShareUserIds($shareUserIds) {
        $this->share_user_ids = $shareUserIds;
        return $this;
    }
}